\(\int (e x)^{-1+3 n} (a+b \text {sech}(c+d x^n)) \, dx\) [75]

   Optimal result
   Rubi [A] (verified)
   Mathematica [F]
   Maple [F]
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 22, antiderivative size = 217 \[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,-i e^{c+d x^n}\right )}{d^3 e n}-\frac {2 i b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,i e^{c+d x^n}\right )}{d^3 e n} \]

[Out]

1/3*a*(e*x)^(3*n)/e/n+2*b*(e*x)^(3*n)*arctan(exp(c+d*x^n))/d/e/n/(x^n)-2*I*b*(e*x)^(3*n)*polylog(2,-I*exp(c+d*
x^n))/d^2/e/n/(x^(2*n))+2*I*b*(e*x)^(3*n)*polylog(2,I*exp(c+d*x^n))/d^2/e/n/(x^(2*n))+2*I*b*(e*x)^(3*n)*polylo
g(3,-I*exp(c+d*x^n))/d^3/e/n/(x^(3*n))-2*I*b*(e*x)^(3*n)*polylog(3,I*exp(c+d*x^n))/d^3/e/n/(x^(3*n))

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {14, 5548, 5544, 4265, 2611, 2320, 6724} \[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \arctan \left (e^{c+d x^n}\right )}{d e n}+\frac {2 i b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,-i e^{d x^n+c}\right )}{d^3 e n}-\frac {2 i b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,i e^{d x^n+c}\right )}{d^3 e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-i e^{d x^n+c}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,i e^{d x^n+c}\right )}{d^2 e n} \]

[In]

Int[(e*x)^(-1 + 3*n)*(a + b*Sech[c + d*x^n]),x]

[Out]

(a*(e*x)^(3*n))/(3*e*n) + (2*b*(e*x)^(3*n)*ArcTan[E^(c + d*x^n)])/(d*e*n*x^n) - ((2*I)*b*(e*x)^(3*n)*PolyLog[2
, (-I)*E^(c + d*x^n)])/(d^2*e*n*x^(2*n)) + ((2*I)*b*(e*x)^(3*n)*PolyLog[2, I*E^(c + d*x^n)])/(d^2*e*n*x^(2*n))
 + ((2*I)*b*(e*x)^(3*n)*PolyLog[3, (-I)*E^(c + d*x^n)])/(d^3*e*n*x^(3*n)) - ((2*I)*b*(e*x)^(3*n)*PolyLog[3, I*
E^(c + d*x^n)])/(d^3*e*n*x^(3*n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2611

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 4265

Int[csc[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c +
 d*x)^m*(ArcTanh[E^((-I)*e + f*fz*x)/E^(I*k*Pi)]/(f*fz*I)), x] + (-Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*
Log[1 - E^((-I)*e + f*fz*x)/E^(I*k*Pi)], x], x] + Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*Log[1 + E^((-I)*e
 + f*fz*x)/E^(I*k*Pi)], x], x]) /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 5544

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rule 5548

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[e^IntPart[m]*((e*
x)^FracPart[m]/x^FracPart[m]), Int[x^m*(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps \begin{align*} \text {integral}& = \int \left (a (e x)^{-1+3 n}+b (e x)^{-1+3 n} \text {sech}\left (c+d x^n\right )\right ) \, dx \\ & = \frac {a (e x)^{3 n}}{3 e n}+b \int (e x)^{-1+3 n} \text {sech}\left (c+d x^n\right ) \, dx \\ & = \frac {a (e x)^{3 n}}{3 e n}+\frac {\left (b x^{-3 n} (e x)^{3 n}\right ) \int x^{-1+3 n} \text {sech}\left (c+d x^n\right ) \, dx}{e} \\ & = \frac {a (e x)^{3 n}}{3 e n}+\frac {\left (b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int x^2 \text {sech}(c+d x) \, dx,x,x^n\right )}{e n} \\ & = \frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int x \log \left (1-i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}+\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int x \log \left (1+i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n} \\ & = \frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \operatorname {PolyLog}\left (2,-i e^{c+d x}\right ) \, dx,x,x^n\right )}{d^2 e n}-\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \operatorname {PolyLog}\left (2,i e^{c+d x}\right ) \, dx,x,x^n\right )}{d^2 e n} \\ & = \frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^3 e n}-\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^3 e n} \\ & = \frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,-i e^{c+d x^n}\right )}{d^3 e n}-\frac {2 i b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,i e^{c+d x^n}\right )}{d^3 e n} \\ \end{align*}

Mathematica [F]

\[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx \]

[In]

Integrate[(e*x)^(-1 + 3*n)*(a + b*Sech[c + d*x^n]),x]

[Out]

Integrate[(e*x)^(-1 + 3*n)*(a + b*Sech[c + d*x^n]), x]

Maple [F]

\[\int \left (e x \right )^{-1+3 n} \left (a +b \,\operatorname {sech}\left (c +d \,x^{n}\right )\right )d x\]

[In]

int((e*x)^(-1+3*n)*(a+b*sech(c+d*x^n)),x)

[Out]

int((e*x)^(-1+3*n)*(a+b*sech(c+d*x^n)),x)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1082 vs. \(2 (200) = 400\).

Time = 0.30 (sec) , antiderivative size = 1082, normalized size of antiderivative = 4.99 \[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\text {Too large to display} \]

[In]

integrate((e*x)^(-1+3*n)*(a+b*sech(c+d*x^n)),x, algorithm="fricas")

[Out]

1/3*(a*d^3*cosh((3*n - 1)*log(e))*cosh(n*log(x))^3 + a*d^3*cosh(n*log(x))^3*sinh((3*n - 1)*log(e)) + (a*d^3*co
sh((3*n - 1)*log(e)) + a*d^3*sinh((3*n - 1)*log(e)))*sinh(n*log(x))^3 + 3*(a*d^3*cosh((3*n - 1)*log(e))*cosh(n
*log(x)) + a*d^3*cosh(n*log(x))*sinh((3*n - 1)*log(e)))*sinh(n*log(x))^2 - 6*(-I*b*d*cosh((3*n - 1)*log(e))*co
sh(n*log(x)) - I*b*d*cosh(n*log(x))*sinh((3*n - 1)*log(e)) + (-I*b*d*cosh((3*n - 1)*log(e)) - I*b*d*sinh((3*n
- 1)*log(e)))*sinh(n*log(x)))*dilog(I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x))
+ d*sinh(n*log(x)) + c)) - 6*(I*b*d*cosh((3*n - 1)*log(e))*cosh(n*log(x)) + I*b*d*cosh(n*log(x))*sinh((3*n - 1
)*log(e)) + (I*b*d*cosh((3*n - 1)*log(e)) + I*b*d*sinh((3*n - 1)*log(e)))*sinh(n*log(x)))*dilog(-I*cosh(d*cosh
(n*log(x)) + d*sinh(n*log(x)) + c) - I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)) - 3*(-I*b*c^2*cosh((3*n
- 1)*log(e)) - I*b*c^2*sinh((3*n - 1)*log(e)))*log(cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh
(n*log(x)) + d*sinh(n*log(x)) + c) + I) - 3*(I*b*c^2*cosh((3*n - 1)*log(e)) + I*b*c^2*sinh((3*n - 1)*log(e)))*
log(cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I) - 3*(I*
b*d^2*cosh((3*n - 1)*log(e))*cosh(n*log(x))^2 - I*b*c^2*cosh((3*n - 1)*log(e)) + (I*b*d^2*cosh((3*n - 1)*log(e
)) + I*b*d^2*sinh((3*n - 1)*log(e)))*sinh(n*log(x))^2 + (I*b*d^2*cosh(n*log(x))^2 - I*b*c^2)*sinh((3*n - 1)*lo
g(e)) + 2*(I*b*d^2*cosh((3*n - 1)*log(e))*cosh(n*log(x)) + I*b*d^2*cosh(n*log(x))*sinh((3*n - 1)*log(e)))*sinh
(n*log(x)))*log(I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) +
 c) + 1) - 3*(-I*b*d^2*cosh((3*n - 1)*log(e))*cosh(n*log(x))^2 + I*b*c^2*cosh((3*n - 1)*log(e)) + (-I*b*d^2*co
sh((3*n - 1)*log(e)) - I*b*d^2*sinh((3*n - 1)*log(e)))*sinh(n*log(x))^2 + (-I*b*d^2*cosh(n*log(x))^2 + I*b*c^2
)*sinh((3*n - 1)*log(e)) + 2*(-I*b*d^2*cosh((3*n - 1)*log(e))*cosh(n*log(x)) - I*b*d^2*cosh(n*log(x))*sinh((3*
n - 1)*log(e)))*sinh(n*log(x)))*log(-I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I*sinh(d*cosh(n*log(x))
 + d*sinh(n*log(x)) + c) + 1) - 6*(I*b*cosh((3*n - 1)*log(e)) + I*b*sinh((3*n - 1)*log(e)))*polylog(3, I*cosh(
d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)) - 6*(-I*b*cosh((3*
n - 1)*log(e)) - I*b*sinh((3*n - 1)*log(e)))*polylog(3, -I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I*s
inh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)) + 3*(a*d^3*cosh((3*n - 1)*log(e))*cosh(n*log(x))^2 + a*d^3*cosh(
n*log(x))^2*sinh((3*n - 1)*log(e)))*sinh(n*log(x)))/(d^3*n)

Sympy [F]

\[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\int \left (e x\right )^{3 n - 1} \left (a + b \operatorname {sech}{\left (c + d x^{n} \right )}\right )\, dx \]

[In]

integrate((e*x)**(-1+3*n)*(a+b*sech(c+d*x**n)),x)

[Out]

Integral((e*x)**(3*n - 1)*(a + b*sech(c + d*x**n)), x)

Maxima [F]

\[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\int { {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{3 \, n - 1} \,d x } \]

[In]

integrate((e*x)^(-1+3*n)*(a+b*sech(c+d*x^n)),x, algorithm="maxima")

[Out]

2*b*integrate((e*x)^(3*n - 1)/(e^(d*x^n + c) + e^(-d*x^n - c)), x) + 1/3*(e*x)^(3*n)*a/(e*n)

Giac [F]

\[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\int { {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{3 \, n - 1} \,d x } \]

[In]

integrate((e*x)^(-1+3*n)*(a+b*sech(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((b*sech(d*x^n + c) + a)*(e*x)^(3*n - 1), x)

Mupad [F(-1)]

Timed out. \[ \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx=\int \left (a+\frac {b}{\mathrm {cosh}\left (c+d\,x^n\right )}\right )\,{\left (e\,x\right )}^{3\,n-1} \,d x \]

[In]

int((a + b/cosh(c + d*x^n))*(e*x)^(3*n - 1),x)

[Out]

int((a + b/cosh(c + d*x^n))*(e*x)^(3*n - 1), x)